<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>Link (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>

  <script type="text/javascript" src="//www.google.com/jsapi"></script>
  <script type="text/javascript">
     google.load("visualization", "1", {packages:["orgchart"]});
     var _loadingVisualizations = true;
  </script>

  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
        <span class="fn">editor.Link</span>
        <span>Extends</span>
        <span class="fn-name">
          Object
        </span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    Wrap an editable link.
  </div>


        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_editor_link.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/editor/link.js">Git</a></li>
          </ol>
        </div>
</div>






<h2 class="g-first">Inheritance</h2>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
  <tr><td>goog.editor.Link</td><td></td></tr>
</table>
</div>
<div class='gviz-org-chart-container goog-inline-block'>
<table class='gviz-org-chart' style='display:none'>
</table>
</div>




  <h2>Constructor</h2>
      <div class="fn-constructor">
    goog.editor.Link(<span><span class="arg">anchor</span>,&nbsp;<span class="arg">isNew</span></span>)
  </div>

   <h3>Parameters</h3>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">anchor</span>
        : <div class="fullType">(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The anchor element.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">isNew</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
        <div class="entryOverview">Whether this is a new link.</div>
     </td>
   </tr>
  </table>


<h2>Instance Methods</h2>


  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_editor_Link.html">
              goog.editor.Link
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.finishLinkCreation"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">finishLinkCreation<span class="args">(<span class="arg">field</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       After link creation, finish creating the link depending on the type
of link being created.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">field</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_editor_Field.html">goog.editor.Field</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The field where this link is being created.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line240">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.getAnchor"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getAnchor<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The anchor element.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line73">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.getCurrentText"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getCurrentText<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            The inner text for the anchor.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line90">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.getExtraAnchors"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getExtraAnchors<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;</div>&nbsp;
            The extra anchor elements, if any, created by the browser from a selection.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line82">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.getValidLinkFromText"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">getValidLinkFromText<span class="args">()</span>
        </span>
        &#8658; <div class="fullType">(<span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>&nbsp;
            The modified string for the link if the link text appears to be a valid link. Returns null if this is not a valid link address.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line221">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.initializeUrl"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">initializeUrl<span class="args">(<span class="arg">url</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Set the url without affecting the isNew() status of the link.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">url</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">A URL.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line110">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.isNew"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">isNew<span class="args">()</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       <span class='nodesc'>No description.</span>
     </div>


    <! -- Method details -->
    <div class="entryDetails">

   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            Whether the link is new.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line101">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.placeCursorRightOf"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">placeCursorRightOf<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Places the cursor to the right of the anchor.
Note that this is different from goog.editor.range's placeCursorNextTo
in that it specifically handles the placement of a cursor in browsers
that trap you in links, by adding a space when necessary and placing the
cursor after that space.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line172">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.removeLink"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">removeLink<span class="args">()</span>
        </span>
      </div>


     <div class="entryOverview">
       Removes the link, leaving its contents in the document.  Note that this
object will no longer be usable/useful after this call.
     </div>

   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line119">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.setTextAndUrl"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">setTextAndUrl<span class="args">(<span class="arg">newText</span>,&nbsp;<span class="arg">newUrl</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Change the link.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">newText</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">New text for the link. If the link contains all its text in one descendent, newText will only replace the text in that one node. Otherwise, we'll change the innerHTML of the whole link to newText.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">newUrl</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">A new URL.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line136">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.prototype.updateLinkDisplay_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryName">updateLinkDisplay_<span class="args">(<span class="arg">field</span>,&nbsp;<span class="arg">url</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Updates the cursor position and link bubble for this link.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">field</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_editor_Field.html">goog.editor.Field</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The field in which the link is created.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">url</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The link url.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line209">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Instance Properties</h2>







<div>
       <div class="desc">
         Defined in
         <span class="fn-name">
            <a href="class_goog_editor_Link.html">
              goog.editor.Link
            </a>
         </span>
       </div>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.editor.Link.prototype.anchor_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">anchor_</span>
        : <div class="fullType">(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       The link DOM element.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line50">Code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>





  <a name="goog.editor.Link.prototype.extraAnchors_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">extraAnchors_</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;</div>
     </div>


     <div class="entryOverview">
       Any extra anchors created by the browser from a selection in the same
operation that created the primary link
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line66">Code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.editor.Link.prototype.isNew_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryName">isNew_</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
     </div>


     <div class="entryOverview">
       Whether this link represents a link just added to the document.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line57">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>
</div>




<h2>Static Methods</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.createNewLink"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.editor.Link.</span><span class="entryName">createNewLink<span class="args">(<span class="arg">anchor</span>,&nbsp;<span class="arg">url</span>,&nbsp;<span class="arg">opt_target</span>,&nbsp;<span class="arg">opt_extraAnchors</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="class_goog_editor_Link.html">goog.editor.Link</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Initialize a new link.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">anchor</span>
        : <div class="fullType">(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The anchor element.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">url</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The initial URL.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_target</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The target.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_extraAnchors</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">HTMLAnchorElement</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">Extra anchors created by the browser when parsing a selection.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="class_goog_editor_Link.html">goog.editor.Link</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The link.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line259">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.isLikelyEmailAddress"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.editor.Link.</span><span class="entryName">isLikelyEmailAddress<span class="args">(<span class="arg">str</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       Returns true if str could be an email address, false otherwise

Ex: goog.editor.Link.isLikelyEmailAddress_("some word") == false
goog.editor.Link.isLikelyEmailAddress_("<a href="mailto:foo@foo.com">foo@foo.com</a>") == true
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">str</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">String to test for being email address.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            Whether "str" looks like an email address.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line347">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.isLikelyUrl"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.editor.Link.</span><span class="entryName">isLikelyUrl<span class="args">(<span class="arg">str</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       Returns true if str could be a URL, false otherwise

Ex: TR_Util.isLikelyUrl_("<a href="http://www.google.com">http://www.google.com</a>") == true
TR_Util.isLikelyUrl_("<a href="http://www.google.com">www.google.com</a>") == true
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">str</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">String to check if it looks like a URL.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            Whether str could be a URL.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line284">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.editor.Link.isMailto"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.editor.Link.</span><span class="entryName">isMailto<span class="args">(<span class="arg">url</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
      </div>


     <div class="entryOverview">
       Determines whether or not a url is an email link.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">url</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">A url.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>&nbsp;
            Whether the url is a mailto link.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line357">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>



<h2>Static Properties</h2>






<div class="section">
  <table class="horiz-rule">


     <tr class="even entry private">
       <td class="access"></td>





  <a name="goog.editor.Link.LIKELY_EMAIL_ADDRESS_"></a>

  <td>


     <div class="arg">
        <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.editor.Link.</span><span class="entryName">LIKELY_EMAIL_ADDRESS_</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/RegExp">RegExp</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
     </div>


     <div class="entryOverview">
       Regular expression that matches strings that could be an email address.
     </div>

  </td>


  <td class="view-code">
     <a href="closure_goog_editor_link.js.source.html#line329">Code &raquo;</a>
  </td>
     </tr>


  </table>
</div>









<div class="section">
  <table class="horiz-rule">


  </table>
</div>
      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Package editor</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">Package Reference</h2>
            <div id="sideTypeIndex" rootPath="" current="editor.Link"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
